import React, { Component } from 'react';
import {
    Modal, View, Text, TextInput, StyleSheet, TouchableOpacity
} from 'react-native';
import { scaleSize } from '../util/size';



class NccModal extends Component {
    constructor(props) {
        super(props);
        this.state = {
            modalVisible: true
        }
    }
    render() {
        return (

            <Modal
                visible={this.state.modalVisible}
                animationType={"slide"}
                transparent={true}>
                <TouchableOpacity style={{ flex: 1 }} onPress={() => {
                    this.setState({ modalVisible: false })
                }}>
                    <View style={{
                        flex: 1,
                        backgroundColor: 'rgba(0,0,0,0.5)'
                    }}>
                        <View style={{
                            // alignSelf:'center',
                            marginTop: scaleSize(100),
                            height: 400,
                            width: '100%',
                            backgroundColor: 'red'
                        }}>
                            <Text style={[{
                                marginTop: scaleSize(20),
                            }]}>验证码</Text>
                            <View style={{
                                display: 'flex',
                                flexDirection: 'row',
                                justifyContent: 'space-between',
                            }}>
                                <TextInput placeholder={'0.0000000'} style={[
                                    { marginTop: scaleSize(17) }
                                ]}
                                    keyboardType={'numeric'}
                                    underlineColorAndroid={'transparent'}
                                ></TextInput>
                                <Text style={{
                                    alignSelf: 'flex-end'
                                }}>{1}</Text>
                            </View>
                        </View>
                    </View>
                </TouchableOpacity>
            </Modal>
        )
    }
}

export default NccModal;